home *** CD-ROM | disk | FTP | other *** search
/ Trouble & Attitude 4 / Trouble and Attitude - Issue 04.iso / mac / DATA / MOVIES / COMMON.Cxt / 00133_Field_TEM-CHAPTER PAGE.txt < prev    next >
Text File  |  1997-01-14  |  4KB  |  148 lines

  1.  
  2. --
  3. -- CHAPTER PAGE Script
  4. --
  5. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  6.  
  7. on enterFrame
  8.   
  9.   global gMovieName, gMovie, gSoloMode
  10.   global gNextIcon, gPreIcon, gBackIcon, gControlIcon, gIndexIcon, gFirstIcon
  11.   global gLastFrame, gMusicOn, gCaptionOn
  12.   global gLocalSound
  13.   global gCurPath, gNavMode, gControlPanel
  14.   global gMap1Icon, gMap2Icon, gPlaceOfOrigin, gMultiPageSidebar
  15.   
  16.   if voidP("gLastFrame") then set gLastFrame = 0
  17.   if voidP("gNavMode") then set gNavMode = "chapter"
  18.   if voidP("gLocalSound") then set gLocalSound = FALSE
  19.   
  20.   set gPlaceOfOrigin = 0
  21.   set gMultiPageSidebar = FALSE
  22.   set gNavMode = "chapter"
  23.   
  24.   -- make sure the control panel is updated in every way
  25.   if objectP(gControlPanel) then
  26.     tell window "Control Panel"
  27.       setIconStatus "music", gMusicOn
  28.       setIconStatus "caption", gCaptionOn
  29.     end tell
  30.   end if
  31.   
  32.   
  33.   if the frame = label("C1") then
  34.     -- ARTICLE
  35.     set gMoviePage = FALSE
  36.     set gLastFrame = marker(1)
  37.   else if the frame = label("C2") then
  38.     set gLastFrame = marker(1)
  39.     set gLastFrame = the frame
  40.   else if the frame = label("C3") then
  41.     -- SLIDE SHOW
  42.     set gLastFrame = marker(1)
  43.     set gLocalSound = FALSE
  44.     if gMusicOn = TRUE then
  45.       if gLocalSound = FALSE then
  46.         if soundBusy(1) then sound stop 1
  47.         if soundBusy(2) then sound stop 2
  48.         sound fadeIn 1, 90
  49.         sound playFile 1, gCurPath & "DATA:EDGE:EDGELP.AIF"
  50.         set gLocalSound = TRUE
  51.       end if
  52.     end if
  53.   end if
  54.   if gLocalSound = TRUE then
  55.     if soundBusy(1) = FALSE then
  56.       sound playFile 1, gCurPath & "DATA:EDGE:EDGELP.AIF"
  57.     end if
  58.   end if
  59.   
  60. end enterFrame
  61.  
  62. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  63.  
  64. on exitFrame
  65.   
  66.   global gMovieName, gMovie, gSoloMode
  67.   global gNextIcon, gPreIcon, gBackIcon, gControlIcon, gIndexIcon, gFirstIcon
  68.   global gLastFrame
  69.   
  70.   if gSoloMode = FALSE then keepmusic
  71.   go to the frame
  72.   
  73. end exitFrame
  74.  
  75. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  76.  
  77. on MouseUp
  78.   
  79.   global gMovieName, gMovie, gSoloMode
  80.   global gNextIcon, gPreIcon, gBackIcon, gControlIcon, gIndexIcon, gFirstIcon
  81.   global gLastFrame, gHotText, gHotTextLabel, gPlaceOfOrigin
  82.   global gMap1Icon, gMap2Icon, gPlaceOfOrigin, gSidebarOfOrigin
  83.   
  84.   set nowhere = 0
  85.   set next = 1
  86.   set previous = 2
  87.   set intro = 3
  88.   set sidebar = 4
  89.   set destination = nowhere
  90.   
  91.   if the ClickOn = gControlIcon then 
  92.     openControlPanel
  93.     set destination = nowhere
  94.   else if the ClickOn = gNextIcon then
  95.     if gLastFrame = 0 then
  96.       alert "Internal Navigation Logic Error, how did we get here?"
  97.     end if
  98.     if the frame = gLastFrame then
  99.       set destination = intro
  100.     else
  101.       set destination = next
  102.     end if
  103.   else if the ClickOn = gPreIcon then
  104.     if gLastFrame = 0 then
  105.       alert "Internal Navigation Logic Error, how did we get here?"
  106.     end if
  107.     if the frame = label("C1") then
  108.       set destination = intro
  109.     else if the frame = label("C2") then
  110.       set destination = intro
  111.     else if the frame = label("C3") then
  112.       set destination = intro
  113.     else
  114.       set destination = previous
  115.     end if
  116.   else if the ClickOn = gHotText then
  117.     set gPlaceOfOrigin = the frame
  118.     set destination = sidebar
  119.   end if
  120.   
  121.   case destination of
  122.     next:
  123.       go to frame the frame + 1
  124.     previous: 
  125.       go to frame the frame - 1
  126.     intro:
  127.       set gLocalSound = FALSE
  128.       if soundBusy(1) then sound fadeOut 1, 90
  129.       go to frame "intro"
  130.     sidebar:
  131.       if gHotTextLabel = "gear-list" then
  132.         go to frame label("S1")
  133.       else if gHotTextLabel = "begining-hikes" then
  134.         go to frame label("S2")
  135.       else if gHotTextLabel = "massacre" then
  136.         go to frame label("S3")
  137.       else if gHotTextLabel = "canyoners" then
  138.         go to frame label("S5")
  139.       end if
  140.     otherwise:
  141.       alert "chapter::mouseup: internal error, unknown hot text target"
  142.   end case
  143.   
  144. end MouseUp
  145.  
  146.  
  147.  
  148.